//
//  OrderBuysInformationTableViewCell.m
//  GLGW_Shoping
//
//  Created by yang on 2018/12/7.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "OrderBuysInformationTableViewCell.h"

@interface OrderBuysInformationTableViewCell ()
@property(nonatomic,strong) GLGWLabel * nameLabel;
@property(nonatomic,strong) GLGWLabel * warehoseLabel;
@property(nonatomic,strong) GLGWLabel * adressLabel;

@end

@implementation OrderBuysInformationTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.nameLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:kColor_Rule_Black inSuperView:self.contentView];
        self.nameLabel.text = @"高博涵  18614071701";
        [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.contentView.mas_left).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(12));
            make.right.equalTo(self.contentView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(15));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(20)));
        }];
        //
        self.warehoseLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#666666"] inSuperView:self.contentView];
        self.warehoseLabel.text = @"北京1号仓库";
        [self.warehoseLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(self.nameLabel);
            make.right.equalTo(self.nameLabel);
            make.top.equalTo(self.nameLabel.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(5));
            make.height.equalTo(self.nameLabel);
        }];
        //
        self.adressLabel = [[GLGWLabel alloc] initWithFont:SYSTEMFONT(14) theColor:[UIColor colorWithHexString:@"#999999"] inSuperView:self.contentView];
        self.adressLabel.text = @"北京市朝阳区左家庄中街23号";
        [self.adressLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.right.equalTo(self.nameLabel);
            make.top.equalTo(self.warehoseLabel.mas_bottom).offset(kHeightProportion_In_iPhoneTriploid(5));
            make.bottom.equalTo(self.contentView.mas_bottom).offset(-kHeightProportion_In_iPhoneTriploid(12));
        }];
    }
    return self;
}

- (void)setDataModel:(OrderInfomationDetailDataModel *)dataModel
{
    _dataModel = dataModel;
    NSString *str = [NSString stringWithFormat:@"%@  %@",dataModel.receiverInfo.consignee,dataModel.receiverInfo.phone];
    self.nameLabel.text = str;
    self.warehoseLabel.text = dataModel.receiverInfo.warehouseName;
    self.adressLabel.text = dataModel.receiverInfo.address;
}
@end
